<%@ page contentType="text/html; charset=UTF-8" language="java"%>
<%@include file="/WEB-INF/jsp/include/header.jsp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
	<title>仓储管理系统</title>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery-1.7.1.min.js"></script>
		<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/js/easyui-1.2.5/themes/default/easyui.css">
		<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/js/easyui-1.2.5/themes/icon.css">
		<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/table.css">
		<script type="text/javascript" src="${pageContext.request.contextPath}/js/easyui-1.2.5/jquery.easyui.min.js"></script>
		<script type="text/javascript" src="${pageContext.request.contextPath}/js/easyui-1.2.5/locale/easyui-lang-zh_CN.js"></script>
		<script type="text/javascript" src="${pageContext.request.contextPath}/js/easyui-1.2.5/plugins/jquery.validatebox.js"></script>
		<script type="text/javascript" src="${pageContext.request.contextPath}/js/easyui-1.2.5/validatebox.js"></script>
		<script type="text/javascript" src="${pageContext.request.contextPath}/js/globalMaps.js"></script>
		<script type="text/javascript">
			var mcaa = '${purmc.mcaa}';
			var mcab = '${purmc.mcab}';
			var mcac = '${purmc.mcac}';
			<c:forEach items="${globalUmUser.mdafs}" var="mdaf" varStatus="s">
				globalMaps.put('${mdaf}', '${mdaf}');
			</c:forEach>
		</script>
		<script type="text/javascript" src="${pageContext.request.contextPath}/js/pur/purmd.js"></script>
	</head>
	<body>
		<div id="menuDiv" style="padding:5px;background:#fafafa;width:980px;"></div>
		<div id="listDiv" style="padding:3px 2px;height:30px;width:980px">
			<table>
				<tr>
					<td align="right">单别：</td>
					<td align="left"><input type="text" class="easyui-validatebox" id="purmcAa" name="mcab" maxlength="20" required="true" value="${purmc.mcaa}" readOnly="readonly" /></td>

					<td align="right">单号：</td>
					<td align="left"><input type="text" class="easyui-validatebox" id="purmcAb" name="mcab" maxlength="20" required="true" value="${purmc.mcab}" readOnly="readonly"/></td>
					<td align="right">单据日期：</td>
					<td align="left"><input type="text" name="mcad" id="purmcAd" class="easyui-validatebox" maxlength="20" required="true" value="${purmc.mcad}" readOnly="readonly"></td>
				</tr>
			</table>
		</div>
		<!-- 表格 -->
		<table id="purmdTable" border="0" cellspacing="0" cellpadding="0" width="98%" pagination="true" remoteSort="false" singleSelect="false" idField="mdac" showFooter="false" striped="true" url="<c:url value='/purmd/purmdList.xhtml'><c:param name="mcaa" value="${mcaa}"/><c:param name="mcab" value="${mcab}"/></c:url>">
			<thead>
				<tr align="center">
					<th field="mdac" width="70">序号</th>
					<th field="mdad" width="100" >物料编号</th>
					<th field="mdan" width="100">库位</th>
					<th field="mdae" width="100">包号</th>
					<th field="mdaf" width="50" >数量</th>
					<th field="mdag" width="50">单位</th>
					<th field="mdah" width="70">净重</th>
					<th field="mdai" width="100">毛重</th>
					<th field="mdaj" width="150">手册号</th>
					<th field="mdak" width="50" >采购单单别</th>
					<th field="mdal" width="100">单号</th>
					<th field="mdam" width="50">行号</th>
				</tr>
			</thead>
		</table>
		
		<!-- 添加 -->
		<div id="purmdAdd" icon="icon-save" style="padding:5px;width:300px;height:400px;">
			<form method="post" name="addForm" id="addForm">
				<input type="hidden" id="purmdAddMdaa" name="mdaa" value="${mcaa}"/>
				<input type="hidden" id="purmdAddMdab" name="mdab" value="${mcab}"/>
				<div class="ToolTip_Form" id="purmdAddForm" onkeydown="if(event.keyCode==13){purmdAdd();}">
					<table>
						<tr>
							<td align="right">库位：</td>
							<td align="left"><input type="text" class="easyui-validatebox" id="purmdAddMdan" name="mdan" required="true" missingMessage="库位不能为空!"/></td>
						</tr>
						<tr>
							<td align="right">物料编号：</td>
							<td align="left"><input type="text" class="easyui-validatebox" id="purmdAddMdad" name="mdad" required="true" missingMessage="物料编号不能为空!"/></td>
						</tr>
						<tr>
							<td align="right">批次号：</td>
							<td align="left"><input type="text" class="easyui-validatebox" id="purmdAddMdae" name="mdae" required="true" missingMessage="批次号不能为空!"/></td>
						</tr>
						<tr>
							<td align="right">数量：</td>
							<td align="left"><input type="text" class="easyui-validatebox" id="purmdAddMdaf" name="mdaf"  required="true" validType="isDouble" missingMessage="数量不能为空!"/></td>
						</tr>
						<tr>
							<td align="right">单位：</td>
							<td align="left"><input type="text" class="easyui-validatebox" id="purmdAddMdag" name="mdag" required="true" missingMessage="单位不能为空!"/></td>
						</tr>
						<tr>
							<td align="right">净重：</td>
							<td align="left"><input type="text" class="easyui-validatebox" id="purmdAddMdah" name="mdah" required="true" validType="isDouble" missingMessage="净重不能为空!" /></td>
						</tr>
						<tr>
							<td align="right">毛重：</td>
							<td align="left"><textarea class="easyui-validatebox" id="purmdAddMdai" name="mdai" required="true" validType="isDouble" missingMessage="毛重不能为空!"></textarea></td>
						</tr>
						<tr>
							<td align="right">手册号：</td>
							<td align="left"><textarea class="easyui-validatebox" id="purmdAddMdaj" name="mdaj"></textarea></td>
						</tr>
						<tr>
							<td align="right">采购单别：</td>
							<td align="left"><input type="text" class="easyui-validatebox" id="purmdAddMdak" name="mdak"  /></td>
						</tr>
						<tr>
							<td align="right">采购单号：</td>
							<td align="left"><input type="text" class="easyui-validatebox" id="purmdAddMdal" name="mdal" /></td>
						</tr>
						<tr>
							<td align="right">行号：</td>
							<td align="left"><input type="text" class="easyui-validatebox" id="purmdAddMdam" name="mdam"  required="true" validType="isDouble" /></td>
						</tr>
						<tr>
							<td colspan="2" align="center">
								<a href="#" class="easyui-linkbutton" icon="icon-ok" onclick="purmdAdd();">提交</a>
								<a href="#" class="easyui-linkbutton" icon="icon-redo" onclick="closeDialogAdd();">关闭</a>
							</td>
						</tr>
					</table>
				</div>
			</form>
		</div>
		<!-- 编辑 -->
		<div id="purmdUpdate" icon="icon-save" style="padding:5px;width:300px;height:400px;">
			<form method="post" name="updateForm" id="updateForm">
				<input type="hidden" id="purmdUpdateMdaa" name="mdaa" value="${mcaa}"/>
				<input type="hidden" id="purmdUpdateMdab" name="mdab" value="${mcab}"/>
				<input type="hidden" id="purmdUpdateMdac" name="mdac" value=""/>
				<div class="ToolTip_Form" id="purmdUpdateForm" onkeydown="if(event.keyCode==13){purmdUpdate();}">
					<table>
						<tr>
							<td align="right">库位：</td>
							<td align="left"><input type="text" class="easyui-validatebox" id="purmdUpdateMdan" name="mdan" required="true" missingMessage="库位不能为空!"/></td>
						</tr>
						<tr>
							<td align="right">物料编号：</td>
							<td align="left"><input type="text" class="easyui-validatebox" id="purmdUpdateMdad" name="mdad" required="true" missingMessage="物料编号不能为空!"/></td>
						</tr>
						<tr>
							<td align="right">批次号：</td>
							<td align="left"><input type="text" class="easyui-validatebox" id="purmdUpdateMdae" name="mdae" required="true" missingMessage="批次号不能为空!"/></td>
						</tr>
						<tr>
							<td align="right">数量：</td>
							<td align="left"><input type="text" class="easyui-validatebox" id="purmdUpdateMdaf" name="mdaf"  required="true" validType="isDouble" missingMessage="数量不能为空!"/></td>
						</tr>
						<tr>
							<td align="right">单位：</td>
							<td align="left"><input type="text" class="easyui-validatebox" id="purmdUpdateMdag" name="mdag" required="true" missingMessage="单位不能为空!"/></td>
						</tr>
						<tr>
							<td align="right">净重：</td>
							<td align="left"><input type="text" class="easyui-validatebox" id="purmdUpdateMdah" name="mdah" required="true" validType="isDouble" missingMessage="净重不能为空!" /></td>
						</tr>
						<tr>
							<td align="right">毛重：</td>
							<td align="left"><textarea class="easyui-validatebox" id="purmdUpdateMdai" name="mdai" required="true" validType="isDouble" missingMessage="毛重不能为空!"></textarea></td>
						</tr>
						<tr>
							<td align="right">手册号：</td>
							<td align="left"><textarea class="easyui-validatebox" id="purmdUpdateMdaj" name="mdaj"></textarea></td>
						</tr>
						<tr>
							<td align="right">采购单别：</td>
							<td align="left"><input type="text" class="easyui-validatebox" id="purmdUpdateMdak" name="mdak"  /></td>
						</tr>
						<tr>
							<td align="right">采购单号：</td>
							<td align="left"><input type="text" class="easyui-validatebox" id="purmdUpdateMdal" name="mdal" /></td>
						</tr>
						<tr>
							<td align="right">行号：</td>
							<td align="left"><input type="text" class="easyui-validatebox" id="purmdUpdateMdam" name="mdam"  required="true" validType="isDouble" /></td>
						</tr>
						<tr>
							<td colspan="2" align="center">
								<a href="#" class="easyui-linkbutton" icon="icon-ok" onclick="purmdUpdate();">提交</a>
								<a href="#" class="easyui-linkbutton" icon="icon-redo" onclick="closeDialogUpdate();">关闭</a>
							</td>
						</tr>
					</table>
				</div>
			</form>
		</div>
	</body>
</html>